<template>
  <div class="hello">

  </div>

</template>

<script type="text/ecmascript-6">
  import {mapState, mapActions} from 'vuex'

  export default {
    name: 'hello',
    data () {
      return {
        todos: [
          { text: '学习 JavaScript' },
          { text: '学习 Vue' },
          { text: '整个牛项目' }
        ],
        msg: 'Welcome to Your Vue.js App'
      }
    },
    computed: {
      factorys () {
        return this.$store.state.UserModule.factorys
      }
    },
    methods: {
      ...mapActions([
        'queryFactory' // 映射 this.increment() 为 this.$store.dispatch('increment')
      ]),
    },
    created: function () {
      this.queryFactory({size:20,number:1})
    }
  }
</script>
